Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |saturating_to_i128

std/conv::|saturating_to_i128


Usage

|saturating_to_i128<T>(value)

Generics

◻ T: SaturatingToI128

Parameters

↳ value: T

Return

i128


Turns data into i128, saturating if needed.

This function makes a saturating and infaillible conversion to i128. If incoming data represents something out of bounds for i128, then the resulting value is set to minimum or maximum, depending what is the closest to truth.